#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int mod = 1e9 + 7;

int gcd(int a, int b)
{
    return b ? gcd(b, a % b) : a;
}

ll qmi(ll a, ll b)
{
    ll res = 1;
    while(b)
    {
        if(b & 1)res = res * a % mod;
        b >>= 1;
        a = a * a % mod;
    }
    return res;
}

void solve()
{
    int n;
    scanf("%d", &n);
    ll sum = 0;
    int x;
    unordered_set<ll> mp;
    mp.insert(0);
    for(int i = 1; i <= n; i++)
    {
        scanf("%d", &x);
        if(i & 1)sum -= x;
        else sum += x;
        if(mp.count(sum))
        {
            puts("YES");
            for(int j = i + 1; j <= n; j++) scanf("%d", &x);
            return;
        }
        mp.insert(sum);
    }
    puts("NO");
}

int main()
{
    int t;
    cin >> t;
    while(t--)
        solve();
    return 0;
}